package com.kfm.springboot.enable;

import com.kfm.springboot.autoconfig.annotation.EnableMyDataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
//@ComponentScan("com.kfm.springboot.autoconfig")
//@Import(SpringConfig.class)
@EnableMyDataSource
public class MyApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MyApplication.class, args);

        Object myDataSource = context.getBean("myDataSource");
        System.out.println(myDataSource);
    }
}
